home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gIndexOfCurrentButton, gMouseDownInButton, gIsMainButton, gIsSmallButton, gChannelForHighLights, gNumberOfMainButtons, gCentersOfMainButtons, gMagicOffsetsOfMainButtons, gCastMemsOfMainButtons, gCentersOfSmallButtons, gMagicOffsetsOfSmallButtons, gCastMemsOfSmallButtons, gSmallButtonsOn
- set hTemp to the mouseH
- set vTemp to the mouseV
- set gIndexOfCurrentButton to isPositionWithinMainButton(hTemp, vTemp)
- if gIndexOfCurrentButton > 0 then
- set gMouseDownInButton to 1
- set gIsMainButton to 1
- set the castNum of sprite gChannelForHighLights to getAt(gCastMemsOfMainButtons, gIndexOfCurrentButton)
- set centerTemp to getAt(gCentersOfMainButtons, gIndexOfCurrentButton)
- set offsetTemp to getAt(gMagicOffsetsOfMainButtons, gIndexOfCurrentButton)
- set the visible of sprite gChannelForHighLights to 1
- set the ink of sprite gChannelForHighLights to 0
- set the locH of sprite gChannelForHighLights to getAt(centerTemp, 1) + getAt(offsetTemp, 1)
- set the locV of sprite gChannelForHighLights to getAt(centerTemp, 2) + getAt(offsetTemp, 2)
- else
- if gSmallButtonsOn then
- set gIndexOfCurrentButton to isPositionWithinSmallButton(hTemp, vTemp)
- if gIndexOfCurrentButton > 0 then
- set gMouseDownInButton to 1
- set gIsSmallButton to 1
- set the castNum of sprite gChannelForHighLights to getAt(gCastMemsOfSmallButtons, gIndexOfCurrentButton)
- set centerTemp to getAt(gCentersOfSmallButtons, gIndexOfCurrentButton)
- set offsetTemp to getAt(gMagicOffsetsOfSmallButtons, gIndexOfCurrentButton)
- set the visible of sprite gChannelForHighLights to 1
- set the ink of sprite gChannelForHighLights to 0
- set the locH of sprite gChannelForHighLights to getAt(centerTemp, 1) + getAt(offsetTemp, 1)
- set the locV of sprite gChannelForHighLights to getAt(centerTemp, 2) + getAt(offsetTemp, 2)
- end if
- end if
- end if
- end
-
- on mouseUp
- global gIndexOfCurrentButton, gMouseDownInButton, gIsMainButton, gIsSmallButton, gChannelForHighLights, gNumberOfMainButtons, gLabelsForSmallButtonActions, gAnisForMainButtons, gAniHasBeenViewed, gNextLabel, gMovieToPlay, gSmallButtonsOn
- if gMouseDownInButton then
- set hTemp to the mouseH
- set vTemp to the mouseV
- if gIsMainButton then
- set iButtonTemp to isPositionWithinMainButton(hTemp, vTemp)
- if iButtonTemp = gIndexOfCurrentButton then
- setAt(gAniHasBeenViewed, gIndexOfCurrentButton, 1)
- set gMovieToPlay to 1
- set countOfViewed to 0
- repeat with iButCount = 1 to gNumberOfMainButtons
- if getAt(gAniHasBeenViewed, iButCount) then
- set countOfViewed to countOfViewed + 1
- end if
- end repeat
- if countOfViewed < gNumberOfMainButtons then
- set gNextLabel to "cont"
- set gSmallButtonsOn to 1
- else
- set gNextLabel to "conc"
- set gSmallButtonsOn to 1
- end if
- end if
- else
- if gSmallButtonsOn and gIsSmallButton then
- set iButtonTemp to isPositionWithinSmallButton(hTemp, vTemp)
- if iButtonTemp = gIndexOfCurrentButton then
- set gNextLabel to getAt(gLabelsForSmallButtonActions, gIndexOfCurrentButton)
- end if
- end if
- end if
- end if
- set the visible of sprite gChannelForHighLights to 0
- set gMouseDownInButton to 0
- set gIsMainButton to 0
- set gIsSmallButton to 0
- end
-